import App from './App'
import store from "./store/index.js"


// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
//公共方法
import { $gotoUrl, timestampToDate } from './utils/util'
Vue.prototype.$gotoUrl = $gotoUrl
Vue.prototype.$timestampToDate = timestampToDate
//公共组件
import NavBar from './components/nav.vue'
Vue.component('NavBar', NavBar)
//接口请求
import request from './request/request.js'
Vue.prototype.$http = request;
Vue.config.productionTip = false
Vue.prototype.$store = store

import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
App.mpType = 'app'
const app = new Vue({
  ...App,
  store
})

app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp () {
  const app = createSSRApp(App)
  return {
    app,
  }
}
// #endif